package com.zy.cat.entity.dev;

import java.util.UUID;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Index;
import javax.persistence.Table;

import com.zy.cat.entity.primary.CatDevHCInviteIncomeHistoryPrimary;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 
 * @info 互拆红包邀请好友收入记录
 * @author Link
 * @date 2019-11-26 14:44
 */
@Entity
@Table(name = "zy_cat_user_hc_invite_income_data", indexes = {
		@Index(name = "pid", columnList = "pid"),
		@Index(name = "stime", columnList = "stime"),
		@Index(name = "etime", columnList = "etime"), 
		@Index(name = "ytype", columnList = "ytype"), 
		@Index(name = "fstatus", columnList = "fstatus"), 
		@Index(name = "hstatus", columnList = "hstatus"), 
		@Index(name = "ltime", columnList = "ltime"),
		@Index(name = "ctime", columnList = "ctime") })
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("互拆红包邀请好友收入记录")
//@IdClass(CatDevHCInviteIncomeHistoryPrimary.class)
public class CatDevHCInviteIncomeHistory {
	
	@Id
	@Column(columnDefinition = "CHAR(32) NOT NULL  COMMENT '主键ID'")
	@ApiModelProperty(value = "主键ID", example = "c9adb120ca2b48f88626ebd35000fa08")
	private String id=UUID.randomUUID().toString().replace("-", "");

	@Column(columnDefinition = "CHAR(32) NOT NULL COMMENT '邀请人账号ID【互拆红包邀请好友收入记录】'")
	@ApiModelProperty(value = "邀请人账号ID", example = "3d6a4fa29641")
	private String pid;
	
	@Column(columnDefinition = "CHAR(32) NOT NULL  COMMENT '本轮互拆活动ID'")
	@ApiModelProperty(value = "本轮互拆活动ID", example = "c9adb120ca2b48f88626ebd35000fa08")
	private String aid;

	@Column(columnDefinition = "VARCHAR(20) NOT NULL  COMMENT '开始时间'")
	@ApiModelProperty(value = "开始时间", example = "2019-02-22")
	private String stime;
	
	@Column(columnDefinition = "VARCHAR(20) NOT NULL  COMMENT '结束时间'")
	@ApiModelProperty(value = "结束时间", example = "2019-02-22")
	private String etime;

	@Column(columnDefinition = "BIGINT(20) DEFAULT '0' COMMENT '邀请奖励（分）'")
	@ApiModelProperty(value = "邀请奖励（分）", example = "300")
	private long income;
	
	@Column(columnDefinition = "INT(2) DEFAULT '0' COMMENT '邀请来源（0.个人中心分享、1.刮刮卡进入、2.神奇便利店进入、3.微信邀请成功）'")
	@ApiModelProperty(value = "邀请来源（0.个人中心分享、1.刮刮卡进入、2.神奇便利店进入、3.微信邀请成功）", example = "1")
	private int ytype;
	
	@Column(columnDefinition = "VARCHAR(32) DEFAULT '-'  COMMENT '微信分享成功注册的unionid'")
	@ApiModelProperty(value = "微信分享成功注册的unionid", example = "oHi2t1ZZvfShYW1IDEg0a_3Iu_1Q")
	private String yunionid;

	@Column(columnDefinition = "INT(10) DEFAULT '1' COMMENT '奖励发放状态（-1.违规不发放、0.发放中、1.已发放）'")
	@ApiModelProperty(value = "奖励发放状态（-1.违规不发放、0.发放中、1.已发放）", example = "1")
	private int fstatus;
	
	@Column(columnDefinition = "INT(10) DEFAULT '1' COMMENT '本轮状态（0.进行中1.已达标2.达标已过期3.未达标已过期）'")
	@ApiModelProperty(value = "本轮状态（0.进行中1.已达标2.达标已过期3.未达标已过期）", example = "1")
	private int hstatus;
	
	@Column(columnDefinition = "VARCHAR(20) DEFAULT '-'  COMMENT '创建时间'")
	@ApiModelProperty(value = "创建时间", example = "2019-02-22 12:56:56")
	private String ctime;

	@Column(columnDefinition = "VARCHAR(20) DEFAULT '-'  COMMENT '最后更新时间'")
	@ApiModelProperty(value = "最后更新时间", example = "2019-02-22 12:56:56")
	private String ltime;

	@Column(columnDefinition = "VARCHAR(200) DEFAULT '-' COMMENT '备注'")
	@ApiModelProperty(value = "备注", example = "备注")
	private String info = "-";

	public CatDevHCInviteIncomeHistory(String pid, String stime, String etime, long income, int ytype, String yunionid,
			int fstatus, int hstatus, String ctime, String ltime, String info,String aid) {
		super();
		this.pid = pid;
		this.stime = stime;
		this.etime = etime;
		this.income = income;
		this.ytype = ytype;
		this.yunionid = yunionid;
		this.fstatus = fstatus;
		this.hstatus = hstatus;
		this.ctime = ctime;
		this.ltime = ltime;
		this.info = info;
		this.aid=aid;
	}

	public CatDevHCInviteIncomeHistory(String pid) {
		super();
		this.pid = pid;
	}
	
}
